﻿using Abp.Domain.Services;
using System.Threading.Tasks;

namespace Mt.Site.Core.VerifyCodes
{
    public interface IVerifyCodeManager: IDomainService
    {
        /// <summary>
        /// 持久化到数据库,验证码发送邮箱或短信
        /// </summary>
        /// <param name="email"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        Task<string> GetVerifyCode(string email, VerifyCodeType type);

        Task<bool> CheckVerifyCode(string email, VerifyCodeType type,string key);

        /// <summary>
        /// 普通的网页版验证码
        /// </summary>
        /// <returns></returns>
        Task<byte[]> GetVerifyCodeAndResponse(bool onlyDigit = false);

        Task<bool> CheckVerifyCode(string inputVerifyCode);
    }
}
